import Layout from '@/views/Layout.vue'
import HomePage from '@/views/HomePage.vue'
import FindHouse from '@/views/FindHouse.vue'
import Info from '@/views/Info.vue'
import MyInfo from '@/views/MyInfo.vue'

import Detial from '@/views/Detial.vue'

const routes = [
  { 
    path: '/',
    component: Layout,
    redirect: '/homepage',
    children: [
      {
        name: 'home',
        path: '/homepage',
        component: HomePage,
      },
      {
        name: 'search',
        path: '/findhouse',
        component: FindHouse,
      },
      {
        name: 'friends',
        path: '/info',
        component: Info,
      },
      {
        name: 'setting',
        path: '/myinfo',
        component: MyInfo,
      },
    ],
  },
  {
    path: '/detial',
    name: 'detial',
    component:Detial,
  },
]

export default routes
